package com.example.android.story.Utils;

import android.arch.lifecycle.LiveData;
import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Delete;
import android.arch.persistence.room.Insert;
import android.arch.persistence.room.Query;
import android.arch.persistence.room.Update;

import java.util.List;

/**
 * Created by liwei on 2018/5/21.
 */

@Dao
public interface ActorsInStoryDao {
    @Query("select * from _actors_in_story where story_title=:story_title")
    public LiveData<List<ActorsInStory>> getAllActorsInStoryLiveData(String story_title);

    @Query("select * from _actors_in_story where story_title=:story_title")
    public List<ActorsInStory> getAllActorsInStory(String story_title);

    @Delete
    public void deleteActorsInStory(ActorsInStory actorsInStory);

    @Update
    public void updateActorsInStory(ActorsInStory actorsInStory);

    @Insert
    public void insertActorsInStory(ActorsInStory actorsInStory);
}
